<template>
  <div class="lore">
    <div class="find">
      <el-input placeholder="请输入内容"></el-input>
      <el-button size="small">查找</el-button>
      <el-button type="button"  @click="dialogTableVisible = true"  size="small">增加</el-button>
    </div>
    <el-dialog title="添加只是构建" :visible.sync="dialogTableVisible">
      <el-form :model="form">
        <el-form-item label="症状" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="关联度" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="频次" :label-width="formLabelWidth">
          <el-input v-model="form.name" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogTableVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
      </div>
    </el-dialog>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="序号"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="症状"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="关联度">
      </el-table-column>
      <el-table-column
        prop="number"
        label="频次">
      </el-table-column>
      <el-table-column
        label="操作">
        <template scope="scope">
          <el-button type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        dialogTableVisible: false,
        dialogFormVisible: false,
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        },
        formLabelWidth: '150px',
        tableData: [{
          date: '1',
          name: '背寒',
          address: '9',
          number:'1212132'
        }, {
          date: '2',
          name: '背直',
          address: '7',
          number:'12'
        }, {
          date: '3',
          name: '恶心',
          address: '3',
          number:'12'
        }, {
          date: '4',
          name: '额热',
          address: '3',
          number:'12'
        }, {
          date: '5',
          name: '疔肿',
          address: '3',
          number:'12'
        }]
      }
    }
  }
</script>
<style>
  .lore{
    margin-top: 10px;
    margin-left: 10px;
  }
  .lore th{
    text-align: center;
  }
  .lore .el-input{
    width:80%;
    float: left;
  }
  .lore .el-dialog{
    width:40%;
  }
</style>
